package com.hpf.lease.web.admin.controller;

import com.hpf.lease.common.result.Result;
import com.hpf.lease.model.bean.FeeValue;
import com.hpf.lease.web.admin.service.FeeValueService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/admin/fee/value")
@Tag(name = "房间的房杂费值管理")
public class FeeValueController {
    @Resource
    FeeValueService feeValueService;
    @PostMapping("/saveOrUpdate")
    @Operation(summary = "房杂费的值已存在")
    public Result<Object> saveOrUpdate(@RequestBody FeeValue feeValue){
        return Result.build(feeValueService.saveOrUpdateInfo(feeValue));
    }
    @DeleteMapping("/deleteById")
    @Operation(summary = "根据id删除房杂费的值")
    public Result<Object> deleteById(@RequestParam Long id){
        return Result.build(feeValueService.removeById(id));
    }
}
